<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>头部公共部分</title>
 
	 <link rel="stylesheet" type="text/css"
			href="./styles/bbs_index_style.css">
			
   <link rel="stylesheet" href="<%=basePath%>styles/lavalamp_test.css" type="text/css"
			media="screen">
			
		<script type="text/javascript" src="<%=basePath%>javaScripts/jquery-1.5.1.min.js"></script>
		<script type="text/javascript" src="<%=basePath%>javaScripts/jquery.easing.min.js"></script>
		<script type="text/javascript" src="<%=basePath%>javaScripts/jquery.lavalamp.min.js"></script>
			<link rel="stylesheet" type="text/css" href="./styles/chromestyle.css" />
		<script type="text/javascript" src="./javaScripts/chrome.js"></script>
		
		<script type="text/javascript">
      function logon(){
     
        if(confirm("你确定要注销吗？")){
          window.location="<%=basePath%>"+"logonAction.action";
		}
	}
</script>
		<script type="text/javascript">
        $(function() {
            $("#3").lavaLamp({
                fx: "backout", 
                speed: 700,
                click: function(event, menuItem) {
                    return true;
                }
            });
        });
    </script>
    <SCRIPT type="text/javascript">
    	window.onload = function() { 
			var lis = document.getElementsByTagName("li"); 
			for (var i=0; i<lis.length; i++) { 
				var oldClass;
				lis[i].onmouseover = function() { 
					oldClass=this.getAttribute("class");
					this.setAttribute("class", "tr_after"); 
				} 
				lis[i].onmouseout = function() { 
					this.setAttribute("class", oldClass); 
				} 
			} 
		} 
    </SCRIPT>
  </head>
  
  <body style=" margin-left: auto; margin-right: auto; text-align: center;">
      <div class="com_header">
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
       <tr >
        <td width="50%" align="left">
               <img src="<%=basePath%>images/bbs_head_01.gif"/> 
			 </td>
			 <td width="50%" align="right">
			   <img src="<%=basePath%>images/bbs_head_04.gif"/> 
			 </td>
			 </tr>
			 </table>
			</div>
		    <div id="menu3">
							<ul class="topmenu3" id="3">
								<li>
									<a href="#" >首页</a>
								</li>
								<li>
									<a href="<%=basePath%>gegu/search.jsp">个股分析</a>
								</li>
								<li>
									<a href="<%=basePath%>finance/preparePerProfit">财务分析</a>
								</li>
								<li>
									<a href="<%=basePath%>price/advSearch.jsp">股价分析</a>
								</li>
								<li >
									<a href="<%=basePath%>pe/peSearch.jsp">市盈率分析</a>
								</li>
				<!--  			<li>
									<a href="#">工具箱</a>
								</li>-->	
								<li>
									<a href="<%=basePath%>bbs/defaultInitBbsIndex.jsp">股吧</a>
								</li>
							<!-- 	<li><a href="#">联系我们</a></li>-->	
							</ul>
						</div>
			<div class="header_title">
				<div class="header_title_01" >
					<s:if test="#session.userDto!=null">
						 	<div>
			<table width="100%">
				 
				<tr>
					<td width="20%" align="left">
						<span style="color:white;font-size:14px"><s:property value="#session.userDto.userName" />
						<s:property value="#session.userDto.tbSysRole.role" />
						</span>
					</td>
					<td width="80%" align="right">
						<div class="chromestyle " id="chromemenu">
							<ul>
							   <s:if test="#session.userDto.tbSysRole.role=='系统管理员'">
							       <li><a href="./bbs/admin/manager.jsp">系统管理</a></li>
							   </s:if>
							   <s:if test="#session.userDto.tbSysRole.role!='普通用户'&&#session.userDto.tbSysRole.role!='系统管理员'">
							       <li><a  href="./bbs/admin/manager.jsp">论坛管理</a></li>
							   </s:if>
								<li>
									<a href="bbs/msg_queryInbox?senderId=${sessionScope.userDto.id}">短消息</a>
								</li>
								<li>
									<a href="./bbs/search/baseSearchQuery.jsp">搜索</a>
								</li>
								<li>
									<a href="bbs/post/post_queryPostListByAuthor?authorId=${sessionScope.userDto.id}">我的话题</a>
								</li>
								<li>
									<a href="bbs/forward_controlIndex" rel="dropmenu1">控制面板</a>
								</li>
								<li>
									<a href="bbs/forward_helpMsg">帮助</a>
								</li>
								<li>
									<a  href="javaScript:logon();">退出</a>
								</li>
							</ul>
						</div>

						<div id="dropmenu1" class="dropmenudiv">
							<a href="./bbs/forward_controlIndex">控制面板首页</a>
							<a href="./bbs/forward_editorUserInfo">编辑个人资料</a>
						<!-- 	<a href="#">积分记录</a>  -->

						</div>

						<script type="text/javascript">
	           cssdropdown.startchrome("chromemenu");
                </script>
					</td>
				</tr>
			</table>
		</div>
					</s:if>
					<s:else>
						<form action="bbs/user/user_login.action" method="post">
						   <table width="100%" border="0" cellpadding="0" cellspacing="0" >
						   <tr>
						   <td align="right">
								用户名：
								<input type="text" name="userName" style="width: 120px">
								&nbsp;&nbsp;密码：
								<input type="password" name="password" style="width: 120px">
								<input type="submit" value="登录" />
								&nbsp;&nbsp;
								<a href="<%=basePath%>register.jsp">注册</a>
								<a href="<%=basePath%>bbs/search/baseSearchQuery.jsp">搜索</a>
								<a>帮助</a>
						    </td>
						    </tr>
						    </table>
						</form>
					</s:else>
				</div>
			</div>
  </body>
</html>
